<template>
  <el-row class="tac">
    <el-col>
      <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
        <el-menu-item index="1" @click="find">
          <i class="el-icon-search"></i>
          <span>商家查询</span>
        </el-menu-item>
        <el-menu-item index="2" @click="edit">
          <i class="el-icon-set-up"></i>
          <span>商家管理</span>
        </el-menu-item>
        <el-menu-item index="3" @click="add">
          <i class="el-icon-plus"></i>
          <span>添加商家</span>
        </el-menu-item>
        <el-menu-item index="4" @click="authorize">
          <i class="el-icon-setting"></i>
          <span>商家授权</span>
        </el-menu-item>
      </el-menu>
    </el-col>
  </el-row>
</template>

<script>
export default {
  name: "LeftSide",
  methods:{
    find:function (){
      this.$router.push({
        name: 'FindShopInfo',
      })
    },
    edit:function (){
      this.$router.push({
        name: 'EditShopInfo',
      })
    },
    add:function (){
      this.$router.push({
        name: "AddShopInfo",
      })
    },
    authorize:function (){

    }
  },
  setup() {
    const handleOpen = (key, keyPath) => {
      console.log(key, keyPath)
    }
    const handleClose = (key, keyPath) => {
      console.log(key, keyPath)
    }
    return {
      handleOpen,
      handleClose,
    }
  }
}
</script>

<style scoped>
i.el-sub-menu__icon-arrow:nth-child(3) {
  position: relative;
}

</style>


